<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript" src="/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript">
    // var aimgcount = new Array();
    // $(function () {
    //
    //     var url = location.search; //获取url中"?"符后的字串
    //     var str = url.substr(1);
    //     var imgFile = decodeURIComponent(str.replace("imgFile=", ""));
    //     $("#imgId").attr("src", imgFile);
    //
    //
    //
    // })

    $(function () {
        var url = location.search; //获取url中"?"符后的字串
        var str = url.substr(1);
        var imgFile = decodeURIComponent(str.replace("imgFile=", ""));
        console.log(imgFile);
        $("#imgId").attr("src", imgFile);

        function zoomImg(o) {
            var zoom = parseInt(o.style.zoom, 10) || 100;
            zoom += event.wheelDelta / 1; //可适合修改
            if (zoom > 0) o.style.zoom = zoom + '%';
        }

        $(document).ready(function () {
            $("#imgId").bind("mousewheel",
                function () {
                    zoomImg(this);
                    return false;
                });
        });
    })

</script>
<body>
<img id="imgId" src="" width="400"/>
</body>

</html>